import apiRequest from "../common/apiRequest";
// 工程app点击登录
const getLogingcgk = (params) => {
    return apiRequest({
        url: '/txgcgk/api/login',
        method: 'post',
        data: params
    })
}
// 获取首页菜单
const getMenuByRole = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/getMenuByRole',
        method: 'post',
        data: params
    })
}
// 获取首页工程概况
const getProjectOverView = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/getProjectOverView',
        method: 'post',
        data: params
    })
}
// 首页施工统计
const constructionCount = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/constructionCount',
        method: 'post',
        data: params
    })
}
// 首页现场统计 施工人/监理
const sceneCount = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/sceneCount',
        method: 'post',
        data: params
    })
}
// 首页现场统计 二级页面
const sceneInfo = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/sceneInfo',
        method: 'post',
        data: params
    })
}
// 首页现场统计（省信通）
const sxtSceneCount = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/sxtSceneCount',
        method: 'post',
        data: params
    })
}
// 首页问题统计
const problemCount = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/problemCount',
        method: 'post',
        data: params
    })
}
// 首页 里程碑统计
const milestone = (params) => {
    return apiRequest({
        url: '/txgcgk/api/home/milestone',
        method: 'post',
        data: params
    })
}
// 施工填报 获取工程名称
const getEngListByUserId = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fill/getEngListByUserId',
        method: 'post',
        data: params
    })
}
// 施工填报 获取站点名称
const getEngSiteList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fill/getEngSiteList',
        method: 'post',
        data: params
    })
}
// 施工填报-查询配置项总数
const getNetypeMsgAndStati = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fill/getNetypeMsgAndStati',
        method: 'post',
        data: params
    })
}
// 施工填报-获取设备列表
const getNeList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fill/getNeList',
        method: 'post',
        data: params
    })
}
// 施工填报-多选/全选提交
const getCommitFill = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fillDetail/commitFill',
        method: 'post',
        data: params
    })
}
// 获取首页待办列表
const getMatterlist = (params) => {
    return apiRequest({
        url: '/txgcgk/api/mat/matterlist',
        method: 'post',
        data: params
    })
}
// 问题整改详情
const getProblemDetail = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fillDetailProblem/fillDetail',
        method: 'post',
        data: params
    })
}
// 施工填报 - 填报页面详情
const fillDetail = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fillDetail/fillDetail',
        method: 'post',
        data: params
    })
}
// 月计划
// 月计划默认列表
const getMonthDefault = (params) => {
    return apiRequest({
        url: '/txgcgk/api/monthPlan/getDefault',
        method: 'post',
        data: params
    })
}
// 获取工程名称
const getEngList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/monthPlan/getEngList',
        method: 'post',
        data: params
    })
}
//  获取工程站点
const getSiteList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/monthPlan/getSiteList',
        method: 'post',
        data: params
    })
}
// 获取月计划列表
const getDetails = (params) => {
    return apiRequest({
        url: '/txgcgk/api/monthPlan/getDetails',
        method: 'post',
        data: params
    })
}
// 周计划
// 获取周计划时间
const getCalendar = (params) => {
    return apiRequest({
        url: '/txgcgk/api/weekPlan/getCalendar',
        method: 'post',
        data: params
    })
}
// 周计划获取默认数据
const getDefault = (params) => {
    return apiRequest({
        url: '/txgcgk/api/weekPlan/getDefault',
        method: 'post',
        data: params
    })
}
// 周计划名称
const getWeekEngList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/weekPlan/getEngList',
        method: 'post',
        data: params
    })
}
// 周计划获取站点
const getWeekSiteList = (params) => {
    return apiRequest({
        url: '/txgcgk/api/weekPlan/getSiteList',
        method: 'post',
        data: params
    })
}
// 周计划获取列表
const getWeekDetails = (params) => {
    return apiRequest({
        url: '/txgcgk/api/weekPlan/getDetails',
        method: 'post',
        data: params
    })
}
// ---------- 工程列表 ----------
// 获取未关注的工程列表
const getUnLook = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engLook/list',
        method: 'post',
        data: params
    })
}
// 设置关注
const setLook = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engLook/setLook',
        method: 'post',
        data: params
    })
}
// 取消关注
const setUnLook = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engLook/setUnLook',
        method: 'post',
        data: params
    })
}
// 获取关注列表
const getLook = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engLook/getLook',
        method: 'post',
        data: params
    })
}
// 获取工程详情默认数据（带站点信息）
const getEngDefault = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engDetails/getDefault',
        method: 'post',
        data: params
    })
}
// 获取工程详情
const getEngDetails = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engDetails/getEngDetails',
        method: 'post',
        data: params
    })
}
// 获取工程下拉列表
const getEngListByStatus = (params) => {
    return apiRequest({
        url: '/txgcgk/api/engDetails/getEngList',
        method: 'post',
        data: params
    })
}
// 问题详情
const fillDetailProblem = (params) => {
    return apiRequest({
        url: '/txgcgk/api/fillDetailProblem/fillDetail',
        method: 'post',
        data: params
    })
}
//工程审核
const insertTxgcgkDtFillLogs = (params) => {
	return apiRequest({
		url:'/txgcgk/api/mat/insertTxgcgkDtFillLogs',
		method: 'post',
		data: params
	})
}
// ---------- 工程列表结束 ----------
// 现场打卡 获取现场信息
const queryTxgcgkdtxc = (params) => {
    return apiRequest({
        url: '/txgcgk/api/mat/queryTxgcgkdtxc',
        method: 'post',
        data: params
    })
}
// 现场打卡 提交
const insertTxgcgkdtxc = (params) => {
    return apiRequest({
        url: '/txgcgk/api/mat/insertTxgcgkdtxc',
        method: 'post',
        data: params
    })
}
// 现场打卡提交照片
const getImguploads = (params) => {
    return apiRequest({
        url: '/txgcgk/api/file/uploads',
        method: 'post',
        data: params
    })
}

//物资到货 新增
const insertMaterial = (params) => {
    return apiRequest({
        url: '/txgcgk/api/materials/insertMaterial',
        method: 'post',
        data: params
    })
}
// 物资预览
const queryMaterial = (params) => {
    return apiRequest({
        url: '/txgcgk/api/materials/queryMaterial',
        method: 'post',
        data: params
    })
}
export default{
    getLogingcgk,
    getMenuByRole,
    getEngListByUserId,
    getEngSiteList,
    getNetypeMsgAndStati,
    getNeList,
    getMatterlist,
    getCommitFill,
	  fillDetail,
    getEngList,
    getSiteList,
    getDetails,
    getCalendar,
    getWeekEngList,
    getDefault,
    getWeekSiteList,
    getWeekDetails,
    getMonthDefault,
    getProjectOverView,
    constructionCount,
    sceneCount,
    sxtSceneCount,
    problemCount,
    sceneInfo,
    milestone,
    queryTxgcgkdtxc,
    insertTxgcgkdtxc,
    getImguploads,
	getProblemDetail,
// ----- 工程列表 -----
    getUnLook,
    setLook,
    setUnLook,
    getLook,
    getEngDefault,
    getEngDetails,
    getEngListByStatus,
    fillDetailProblem,
	insertTxgcgkDtFillLogs,
// ----- 工程列表结束 -----
	insertMaterial,
    queryMaterial
}
